package org.example;

import org.example.core.Downloader;
import org.example.util.LogUtil;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        String url = null;
        if(url == null || url.length() == 0){
            for (;;){
                //System.out.println("请输入下载链接：");
                LogUtil.info("请输入下载链接：");
                Scanner scanner = new Scanner(System.in);
                url = scanner.next();
                if (url != null){
                    break;
                }
            }
        }else {
            url = args[0];
        }

        //System.out.println(url);
        Downloader downloader = new Downloader();
        downloader.downloader(url);
    }
}
